package com.demo.app.controller;

import com.demo.app.common.Result;
import com.demo.app.manager.UserManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * Controller
 * </p>
 *
 * @author zhangxt
 * @date 2023/11/2
 */
@RestController
@RequestMapping("/demo")
public class UserController {

    @Autowired
    private UserManager manager;

    /**
     * <p>
     * 查询全部
     * </p>
     *
     * @return {@link Result}
     */
    @GetMapping("/all")
    public Result getAll() {
        return manager.selectAll();
    }
}
